package com.ssy.lingxi.order.model.vo.basic.request;

import javax.validation.constraints.NotNull;
import javax.validation.constraints.Positive;
import java.io.Serializable;
import java.util.Objects;

/**
 * 会员Id和会员角色Id作为接口参数VO
 * @author 万宁
 * @version 2.0.0
 * @date 2021-07-26
 */
public class OrderMemberIdAndRoleIdVO implements Serializable {
    private static final long serialVersionUID = 1342166139144350033L;

    /**
     * 会员Id
     */
    @NotNull(message = "会员Id要大于0")
    @Positive(message = "会员Id要大于0")
    private Long memberId;

    /**
     * 会员角色Id
     */
    @NotNull(message = "会员Id要大于0")
    @Positive(message = "会员Id要大于0")
    private Long roleId;

    public Long getMemberId() {
        return memberId;
    }

    public void setMemberId(Long memberId) {
        this.memberId = memberId;
    }

    public Long getRoleId() {
        return roleId;
    }

    public void setRoleId(Long roleId) {
        this.roleId = roleId;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }

        if (o == null || getClass() != o.getClass()) {
            return false;
        }

        OrderMemberIdAndRoleIdVO that = (OrderMemberIdAndRoleIdVO) o;
        return memberId.equals(that.memberId) &&
                roleId.equals(that.roleId);
    }

    @Override
    public int hashCode() {
        return Objects.hash(memberId, roleId);
    }
}
